﻿using System.Windows.Forms;
using System;

namespace 教师管理系统
{
    public partial class Splash : Form
    {
        public Splash()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 改变提示当前程序加载进程的文字
        /// </summary>
        /// <param name="text">程序加载进程提示</param>
        public void ChangeText(string text)
        {
            this.LA_Prog.Text = text;
        }
        /// <summary>
        /// 改变当前加载进度
        /// </summary>
        /// <param name="prog">当前加载进度</param>
        public void ChangeProg(string prog)
        {
            this.progressBarControl1.Text = prog;
        }
        /// <summary>
        /// 窗体淡出
        /// </summary>
        /// <param name="timeout">延迟时间(毫秒)</param>
        public void SideDown(int timeout)
        {
            WinAnti.AnimateWindow(GlobleVar.Splash.Handle, timeout, WinAnti.AW_SLIDE | WinAnti.AW_HIDE | WinAnti.AW_BLEND);
        }
        /// <summary>
        /// 窗体淡入
        /// </summary>
        /// <param name="timeout">延迟时间(毫秒)</param>
        public void SideUp(int timeout)
        {
            WinAnti.AnimateWindow(this.Handle, 1000, WinAnti.AW_BLEND);
        }
        private void Splash_Load(object sender, EventArgs e)
        {
            //窗体淡入
            SideUp(1000);
        }
    }
}
